import Vue from 'vue';
import Router from 'vue-router';
import GraphVis_eCharts from "@/components/Graph/GraphVis_eCharts.vue";
import GraphVis_Neovis from "@/components/Graph/GraphVis_Neovis.vue";
import Index from "@/components/Index.vue";
import AddGraph from "@/components/Graph/AddGraph.vue";
import Login from "@/components/Login/Login.vue";
import GraphVis_eCharts_springboot from "@/components/Graph/GraphVis_eCharts_springboot.vue"
import Welcome from "@/components/Welcome.vue"
import Register from "@/components/Register/Register.vue";
import Admin from "@/components/Admin/Admin.vue";
import GraphManage from "@/components/Admin/GraphManage.vue"
import AdminManage from "@/components/Admin/AdminManage.vue"
import UserManage from "@/components/Admin/UserManage.vue"
import WelcomeAdmin from "@/components/Admin/WelcomeAdmin.vue";
import HydroStatistics from "@/components/Statistics/HydroStatistics.vue"
import HydroChat from "@/components/Chat/HydroChat.vue"
import PersonalCenter from "@/components/PersonalCenter/PersonalCenter.vue"
import BasicUserInfo from "@/components/PersonalCenter/BasicUserInfo.vue"
import ChatHistory from "@/components/PersonalCenter/ChatHistory.vue"
import EditUserInfo from "@/components/PersonalCenter/EditUserInfo.vue"
Vue.use(Router);

export default new Router({
    mode: 'history', // 使用HTML5历史模式
    routes: [
        {
            path: '/',
            component: Index,
            children:[
                {
                    path:"",
                    component:Welcome
                },
                {
                    path:'echarts',
                    component:GraphVis_eCharts_springboot
                },
                {
                    path:'addgraph',
                    component:AddGraph
                },
                {
                    path: 'statistics',
                    component: HydroStatistics
                },
                {
                    path: 'chat',
                    component: HydroChat
                },
                {
                    path: 'personalCenter',
                    component: PersonalCenter,
                    children:[
                        {
                            path:'basicUserInfo',
                            component:BasicUserInfo
                        },
                        {
                            path:'editUserInfo',
                            component:EditUserInfo
                        },
                        {
                            path:'chatHistory',
                            component:ChatHistory
                        }
                    ]
                }

            ]
        },

        // {
        //     path:'/neovis',
        //     component:GraphVis_Neovis
        // },
        {
            path:"/welcome",
            component:Welcome
        },
        {
            path:'/login',
            component:Login
        },
        {
            path:'/register',
            component:Register
        },
        {
            path:'/admin',
            component:Admin,
            children:[
                {
                    path:"",
                    component: WelcomeAdmin
                },
                {
                    path: "adminManage",
                    component: AdminManage
                },
                {
                    path:"userManage",
                    component:UserManage
                },
                {
                    path: "graphManage",
                    component: GraphManage
                }
            ]
        }



    ]
});
